package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the pur_order database table.
 * 
 */
@Entity
@Table(name="pur_order")
@NamedQuery(name="PurOrder.findAll", query="SELECT p FROM PurOrder p")
public class PurOrder implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="order_id")
	private String orderId;

	private String address;

	private String delivery;

	private String istax;

	@Temporal(TemporalType.DATE)
	private Date makingdate;

	private String makingner;

	@Column(name="other_repre")
	private String otherRepre;

	@Column(name="our_repre")
	private String ourRepre;

	private String pay;

	private String purtype;

	private String remarks;

	private String settlement;

	@Temporal(TemporalType.DATE)
	private Date signdate;

	private String sourceid;

	private String sourcetype;

	private int state;

	private String supplier;

	private String theme;

	private String transport;

	//bi-directional many-to-one association to PurOrderDetail
	@OneToMany(mappedBy="purOrder")
	private List<PurOrderDetail> purOrderDetails;

	public PurOrder() {
	}

	public String getOrderId() {
		return this.orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getDelivery() {
		return this.delivery;
	}

	public void setDelivery(String delivery) {
		this.delivery = delivery;
	}

	public String getIstax() {
		return this.istax;
	}

	public void setIstax(String istax) {
		this.istax = istax;
	}

	public Date getMakingdate() {
		return this.makingdate;
	}

	public void setMakingdate(Date makingdate) {
		this.makingdate = makingdate;
	}

	public String getMakingner() {
		return this.makingner;
	}

	public void setMakingner(String makingner) {
		this.makingner = makingner;
	}

	public String getOtherRepre() {
		return this.otherRepre;
	}

	public void setOtherRepre(String otherRepre) {
		this.otherRepre = otherRepre;
	}

	public String getOurRepre() {
		return this.ourRepre;
	}

	public void setOurRepre(String ourRepre) {
		this.ourRepre = ourRepre;
	}

	public String getPay() {
		return this.pay;
	}

	public void setPay(String pay) {
		this.pay = pay;
	}

	public String getPurtype() {
		return this.purtype;
	}

	public void setPurtype(String purtype) {
		this.purtype = purtype;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getSettlement() {
		return this.settlement;
	}

	public void setSettlement(String settlement) {
		this.settlement = settlement;
	}

	public Date getSigndate() {
		return this.signdate;
	}

	public void setSigndate(Date signdate) {
		this.signdate = signdate;
	}

	public String getSourceid() {
		return this.sourceid;
	}

	public void setSourceid(String sourceid) {
		this.sourceid = sourceid;
	}

	public String getSourcetype() {
		return this.sourcetype;
	}

	public void setSourcetype(String sourcetype) {
		this.sourcetype = sourcetype;
	}

	public int getState() {
		return this.state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getSupplier() {
		return this.supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public String getTransport() {
		return this.transport;
	}

	public void setTransport(String transport) {
		this.transport = transport;
	}

	public List<PurOrderDetail> getPurOrderDetails() {
		return this.purOrderDetails;
	}

	public void setPurOrderDetails(List<PurOrderDetail> purOrderDetails) {
		this.purOrderDetails = purOrderDetails;
	}

	public PurOrderDetail addPurOrderDetail(PurOrderDetail purOrderDetail) {
		getPurOrderDetails().add(purOrderDetail);
		purOrderDetail.setPurOrder(this);

		return purOrderDetail;
	}

	public PurOrderDetail removePurOrderDetail(PurOrderDetail purOrderDetail) {
		getPurOrderDetails().remove(purOrderDetail);
		purOrderDetail.setPurOrder(null);

		return purOrderDetail;
	}

}